package com.ecoolex.hotel.saas.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

/**
 * 法人身份证类型
 * @author admin
 *
 */
public enum StoreIdentityType implements EnumInterface<StoreIdentityType, Integer> {
	ID(1, "身份证"), 
	PASSPORT(2, "护照"),
	HK_MACAO_TW_PASS(3,"港澳台通行证"),
	SOLDIER_CERT(4,"士兵证"),
	OFFICER_CERT(5,"军官证"),
	OVERSEAS_CERT(6,"境外证件");
	
	private int real;

	private String describe;

	private StoreIdentityType(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	@Override
	public StoreIdentityType realOf(Integer real) {
		if (Check.notNull(real)) {
			for (StoreIdentityType v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
}
